declare
proc {PathP ?A ?B ?Path}
   {NodeP A}
   {Path2P A B [A] Path}
end

proc {Path2P ?A ?B Trace ?Path}
   choice
      A=B
      Path={Reverse Trace}
   [] C in
      {EdgeP A C}
      {Member C Trace}=false
      {Path2P C B C|Trace Path}
   end
end
